#!/usr/bin/perl

use Test;
BEGIN { plan tests => 2 }

$basedir = $0;
$basedir =~ s|(.*)/[^/]*|$1|;

# Verify that notfromdomain cannot transition to todomain.
# Should fail on the transition permission check.
$result = system(
"runcon -t test_transition_notfromdomain_t -- runcon -t test_transition_todomain_t true 2>&1"
);
ok($result);    # we expect this to fail.

# Verify that fromdomain can transition to todomain.
$result = system(
"runcon -t test_transition_fromdomain_t -- runcon -t test_transition_todomain_t true 2>&1"
);
ok( $result, 0 );
